﻿package mortal.game.net.command.copy.sunbathCopy
{
    import Framework.MQ.*;
    import Message.Command.*;
    import Message.Public.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.mvc.core.*;

    public class SunbathCopyCommand extends BroadCastCall
    {

        public function SunbathCopyCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_2:SPublicInt = null;
            var _loc_3:SPublicInt = null;
            var _loc_4:SSunBathMsg = null;
            var _loc_5:SSunBathInfoMsg = null;
            var _loc_6:SSunBathPlayerInfo = null;
            var _loc_7:SSunBathPerformMsg = null;
            super.call(param1);
            switch(param1.messageHead.command)
            {
                case EPublicCommand._ECmdPublicSunBathNotice:
                {
                    _loc_2 = param1.messageBase as SPublicInt;
                    NetDispatcher.dispatchCmd(ServerCommand.SunBathCopyBeginOpen, _loc_2.publicInt);
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathOpen:
                {
                    _loc_3 = param1.messageBase as SPublicInt;
                    NetDispatcher.dispatchCmd(ServerCommand.SunBathCopyOpen, _loc_3.publicInt);
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathClose:
                {
                    NetDispatcher.dispatchCmd(ServerCommand.SunBathCopyClose, null);
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathEnter:
                {
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathOper:
                {
                    _loc_4 = param1.messageBase as SSunBathMsg;
                    _cache.copy.sunbath.subBathMsg = _loc_4;
                    NetDispatcher.dispatchCmd(ServerCommand.SunBathOperRes, _loc_4);
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathInfo:
                {
                    _loc_5 = param1.messageBase as SSunBathInfoMsg;
                    _cache.copy.sunbath.sunBaths = _loc_5.sunBaths;
                    NetDispatcher.dispatchCmd(ServerCommand.SunbathInfoRes, null);
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathPlayerInfo:
                {
                    _loc_6 = param1.messageBase as SSunBathPlayerInfo;
                    _cache.copy.sunbath.subPlayerInfo = _loc_6;
                    NetDispatcher.dispatchCmd(ServerCommand.SunbathPlayerInfoRes, null);
                    break;
                }
                case EPublicCommand._ECmdPublicSunBathPerform:
                {
                    _loc_7 = param1.messageBase as SSunBathPerformMsg;
                    _cache.copy.sunbath.danceInfo = _loc_7;
                    NetDispatcher.dispatchCmd(ServerCommand.SunbathInfoDance, null);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

    }
}
